-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
feat(dashboard,admin-shared,js-sdk): product option redesign (client-side) #13887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: chore/add-many-to-many-between-product-and-option
Are you sure you want to change the base?
feat(dashboard,admin-shared,js-sdk): product option redesign (client-side) #13887
Conversation
🦋 Changeset detectedLatest commit: 91de56f The changes in this PR will be included in the next version bump. This PR includes changesets to release 74 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
7 Skipped Deployments
|
… feat/product-option-redesign-frontend
… feat/product-option-redesign-frontend
f3d5c5d to
394de22
Compare
… feat/product-option-redesign-frontend
… feat/product-option-redesign-frontend
|
/snapshot-this |
… feat/product-option-redesign-frontend
|
/snapshot-this |
2db3cb1 to
2fdf3ae
Compare
… feat/product-option-redesign-frontend
|
/snapshot-this |
🚀 A snapshot release has been made for this PRTest the snapshots by updating your yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add [email protected]yarn add @medusajs/[email protected]yarn add [email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]yarn add @medusajs/[email protected]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on November 17
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
packages/admin/dashboard/src/hooks/table/filters/use-product-option-table-filters.tsx
Show resolved
Hide resolved
...components/product-create-details-variant-section/product-create-details-variant-section.tsx
Show resolved
Hide resolved
|
@fPolic @olivermrbl @NicolasGorga @adrien2p This would be the PR to actually test from the snapshot :) |
4fb1a9f to
30af643
Compare
… feat/product-option-redesign-frontend
… feat/product-option-redesign-frontend
...components/product-create-details-variant-section/product-create-details-variant-section.tsx
Show resolved
Hide resolved
… feat/product-option-redesign-frontend
| // New option - select all values by default | ||
| newSelectedValues[option.id] = option.values?.map((v) => v.id) || [] | ||
| } | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Option Validation Blocks Product Creation
When a user deselects all product options in the product creation form, handleProductOptionSelect is called with an empty array. This results in selectedProductOptions being empty, which leads to form.setValue("options", []) being called with an empty array at line 246. However, the schema requires options to have at least one item (z.array(ProductCreateOptionSchema).min(1) in constants.ts line 87). This causes a validation error preventing product creation when all options are deselected, even though variants are enabled.
See PR here for server-side changes.
This PR focuses on the admin dashboard. Il will go over what is done and what is missing (which will come in next couple of PRs). I wanted a functional thing first since the PRs are already very big and I will expand on the feature in small additions in the next PRs.
Options dashboard
There is now a section to manage the product options of the medusa project. By default, after running the migration, every option you had should be set to
Exclusive = true. This means that those product options will not be treated asGlobal, which are the ones a user could filter by in a storefront or can be linked to other products.Option creation
CleanShot.2025-11-05.at.13.55.02.mp4
Options can be created in a very similar manner to the one we had at the product creation level. Users input the name and the list of values and can now manage the ordering of those options.
Option edit
CleanShot.2025-11-05.at.13.57.07.mp4
Very similar to the option creation.
Product creation
CleanShot.2025-11-05.at.13.59.23.mp4
It is also possible at product creation to assign existing global options
Note: This section will change the most. Here is what is missing:
Note
Introduce a full Product Options section in the admin (list/detail/create/edit/metadata), add SDK support and product option linking, integrate global options into product creation and product detail, and expose new widget zones and i18n.
Product Optionstop-level nav and full route tree (/product-optionslist, create, detail, edit, metadata). Remove old per-product option create/edit routes; addproducts/:id/options/manage.ids.useProductOption(s)+ mutations (create/update/delete),useLinkProductOptions; update product hooks accordingly.en.jsonwith Product Options strings, general labels (exclusive/global), and actions.product_option.*injection zones and include in globalINJECTION_ZONES.admin.productOptionresource (create/retrieve/list/update/delete).admin.product.linkOptions(productId, { add, remove })for associating options with products.Written by Cursor Bugbot for commit 91de56f. This will update automatically on new commits. Configure here.